/**
 * 
 */
package model;

import java.util.ArrayList;
import java.util.List;

/**
 * @author e412596
 * 
 */
public class Contact
        implements Comparable < Contact > {
    
    private String originalLine;
    
    private String name;
    private List < String > phones;
    private String nextel;

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * e412596
     * @param trim void
     */
    public void addPhone(String trim) {
        if (phones == null) {
            phones = new ArrayList < String >();
        }
        phones.add(trim);
    }

    /**
     * @param phone the phone to set
     */
    public void setPhone(List < String > phone) {
        this.phones = phone;
    }

    /**
     * @return the phone
     */
    public List < String > getPhone() {
        return phones;
    }

    /*
     * (non-Javadoc)
     * 
     * @see java.lang.Comparable#compareTo(java.lang.Object)
     */
    @Override
    public int compareTo(Contact o) {
        return this.getName().compareTo(o.getName());
    }

    /*
     * (non-Javadoc)
     * 
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        return "name: " + this.getName() + " - phone: " + this.getPhone() + " - nextel: " + this.getNextel();
    }

    /**
     * e412596
     * @return
     * String
     */
    public String getNextel() {
        return this.nextel;
    }

    /**
     * e412596
     * @param group void
     */
    public void setNextel(String nextel) {
        this.nextel = nextel;

    }

    /**
     * @param originalLine the originalLine to set
     */
    public void setOriginalLine(String originalLine) {
        this.originalLine = originalLine;
    }

    /**
     * @return the originalLine
     */
    public String getOriginalLine() {
        return originalLine;
    }
}
